Skip to main content

optionKey

Type​

function

Summary​

Returns the state of the Option key.

Syntax​

the optionKey
optionKey()

Description​

Use the optionKey function to check whether the Option key, Meta key, or Alt key is being pressed. You can use optionKey to add alternative capabilities to user actions such as clicking.

The altKey and optionKey functions both return the same value. Which one to use is a matter of preference.

The terminology varies depending on platform. Users of different operating systems may know this key as the Option key (Mac OS systems), Meta key (Unix systems), or Alt key (Windows systems).

Examples​

wait until the optionKey is down
put the optionKey into item 2 of keyState

Value​

NameTypeDescription

return

The optionKey function returns down if the key is pressed and up if it's not.

message: optionKeyDown

constant: left, return

control structure: function

function: value, keysDown, altKey

glossary: Alt key, Meta key, Option key, return, function

Compatibility and Support​

Introduced

LiveCode 1.0

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?